package com.irain.pp.tool.redis.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.ListOperations;
import org.springframework.data.redis.core.ValueOperations;

/**
 * @author WangYanPeng
 * @date 2017/11/14 15:55
 */
public class RedisDAO {

    private final org.springframework.data.redis.core.RedisTemplate template;
    private final ValueOperations<String,Object> valueOps;
    private final ListOperations<String,Object> listOps;

    @Autowired
    public RedisDAO(org.springframework.data.redis.core.RedisTemplate template) {
        this.template = template;
        this.valueOps = template.opsForValue();
        this.listOps = template.opsForList();
    }
}
